// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the GNU Affero General Public License v3.0.
// See the LICENCE file in the repository root for full licence text.

.mp-history-game {
  width: 100%;
  .default-border-radius();

  &__header {
    --border-radius: @border-radius-base @border-radius-base 0 0;
    display: block;

    width: 100%;
    height: 100px;

    border-radius: var(--border-radius);
    position: relative;

    @media @desktop {
      height: 150px;
    }
  }

  &__header-overlay {
    width: 100%;
    height: 100%;

    background-color: #000000;
    opacity: 0.5;

    border-radius: @border-radius-base @border-radius-base 0 0;
  }

  &__stats-box {
    display: flex;
    flex-direction: column;

    position: absolute;
    left: 10px;
    top: 10px;

    @media @desktop {
      flex-direction: row;
    }
  }

  &__stat {
    .default-text-shadow();
    font-size: @font-size--small;
    padding-right: 15px;
    color: @osu-colour-c1;

    @media @desktop {
      font-size: @font-size--title-small;
    }
  }

  &__metadata-box {
    width: calc(100% - 70px);
    position: absolute;
    left: 10px;
    bottom: 10px;
  }

  &__metadata {
    color: @osu-colour-c1;
    .default-text-shadow();

    margin: 0;

    &--title {
      font-size: 16px;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
      line-height: normal;

      @media @desktop {
        font-size: 20px;
      }
    }

    &--artist {
      font-size: 14px;
    }
  }

  &__mods {
    position: absolute;
    right: 10px;
    top: 10px;
    display: flex;
    --mod-height: @mod-height;
  }

  &__team-type {
    position: absolute;

    right: 10px;
    bottom: 10px;

    width: 40px;
    height: 40px;

    background-size: contain;
  }

  &__player-scores {
    --shape-size: 0;
    padding: 10px;
    background-color: @osu-colour-b3;
    display: grid;
    gap: 5px;
    border-radius: 0 0 @border-radius-base @border-radius-base;

    @media @desktop {
      // shape name mods combo acc score rank
      grid-template-columns: var(--shape-size) 1fr auto auto auto auto auto;
      column-gap: 0;
    }

    &--teams {
      --shape-size: 50px;
      border-radius: 0;
    }
  }

  &__team-scores {
    display: flex;
    flex-direction: row;

    width: 100%;
    background-color: @osu-colour-b3;

    @media @desktop {
      justify-content: space-between;
      height: 90px;
    }

    &:last-child {
      border-radius: 0 0 @border-radius-base @border-radius-base;
    }
  }

  &__team-score {
    display: flex;
    align-items: center;
    flex-direction: column;
    width: 50%;

    padding: 20px;

    @media @desktop {
      width: unset;
      &--blue {
        align-items: flex-start;
      }

      &--red {
        align-items: flex-end;
      }
    }
  }

  &__team-score-text {
    text-align: center;
    @media @desktop {
      text-align: left;
    }

    &--name {
      font-size: 15px;
      font-weight: 600;
      color: @osu-colour-c1;
    }

    &--score {
      font-size: 26px;
      color: @osu-colour-c2;

      @media @desktop {
        font-size: 30px;
      }
    }
  }

  &__results {
    display: flex;
    align-items: center;
    justify-content: center;

    background-color: @osu-colour-b4;

    min-height: 45px;
    padding: 0 20px;

    border-radius: 0 0 @border-radius-base @border-radius-base;
  }

  &__results-text {
    font-size: @font-size--title-small-4;
    color: hsl(var(--hsl-c1));

    @media @desktop {
      font-size: @font-size--large;
    }
  }
}
